package com.blog.common;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @ClassName RespBean
 * @Destription 返回的实体类（在构建security的时候，由于反复用到）
 * @Author 天堂小野花
 * @Date 2025/6/19  12:59
 * @Version 1.0
 */
@Data
@AllArgsConstructor
public class RespBean {
    private Integer status;
    private String msg;
    private Object obj;
    public static RespBean ok(String message){
        return new RespBean(200,message,null);
    }
    public static RespBean ok(String message,Object object){
        return new RespBean(200,message,object);
    }
    public static RespBean error(String message){
        return new RespBean(500,message,null);
    }
    public static RespBean error(String message,Object object){
        return new RespBean(500,message,object);
    }
}
